package com.nondo.dean.product.model.result;

import java.math.BigDecimal;

import com.nondo.dean.common.tool.BeanUtils;
import com.nondo.dean.product.domain.Product;

public class ProductResult {
    private Integer id; // 产品ID
    private String code; // 产品编码
    private String name; // 产品名称
    private Integer stock; // 库存数量
    private String orderFlag; // 是否可以下单
    private String mainImage; // 产品主图
    private BigDecimal costPrice; // 成本价
    private BigDecimal salePrice; // 销售价
    private String descrption; // 商品描述

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public String getOrderFlag() {
        return orderFlag;
    }

    public void setOrderFlag(String orderFlag) {
        this.orderFlag = orderFlag;
    }

    public String getMainImage() {
        return mainImage;
    }

    public void setMainImage(String mainImage) {
        this.mainImage = mainImage;
    }

    public BigDecimal getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(BigDecimal costPrice) {
        this.costPrice = costPrice;
    }

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public String getDescrption() {
        return descrption;
    }

    public void setDescrption(String descrption) {
        this.descrption = descrption;
    }

    public static ProductResult covertToBean(Product product) {
        ProductResult productBean = new ProductResult();
        if (product != null) {
            BeanUtils.copy(product, productBean);
        }
        return productBean;
    }

}
